package com.itdianzi.web.contriller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itdianzi.domain.company.Company;
import com.itdianzi.service.company.CompanyService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ApplyController {

    //引入dubbo服务
    @Reference
    private CompanyService companyService;
    @RequestMapping("/apply")
    @ResponseBody
    public String apply(Company company){
        try {
            companyService.save(company);
            return "1";//返回1表示操作成功
        } catch (Exception e) {
            e.printStackTrace();
        }
        //测试gitee没什么用
        return "2";
    }
}
